home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / dev / c / GSys.lha / gsys / gsystem / GObject.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-30  |  1.3 KB  |  73 lines

  1.  
  2. #ifndef GOBJECT_H
  3. #define GOBJECT_H
  4.  
  5. #ifdef GAMIGA
  6.  
  7. #include <exec/types.h>
  8. #include <dos/dos.h>
  9.  
  10. #ifdef GAMIGA_PPC
  11. #include <powerup/ppcproto/exec.h>
  12. #include <powerup/ppcproto/dos.h>
  13. #include <powerup/ppcproto/graphics.h>
  14. #include <powerup/ppcproto/intuition.h>
  15. #include <powerup/ppcproto/gadtools.h>
  16. #include <powerup/ppcproto/asl.h>
  17. #include <powerup/ppcproto/cybergraphics.h>
  18. #else
  19. #include <proto/exec.h>
  20. #include <proto/dos.h>
  21. #include <proto/graphics.h>
  22. #include <proto/intuition.h>
  23. #include <proto/gadtools.h>
  24. #include <proto/asl.h>
  25. #include <proto/cybergraphics.h>
  26. #endif
  27.  
  28. #endif
  29.  
  30. typedef unsigned char GUBYTE;
  31. typedef signed char GBYTE;
  32. typedef unsigned short GUSHORT;
  33. typedef signed short GSHORT;
  34. typedef unsigned int GUWORD;
  35. typedef signed int GWORD;
  36. typedef void * GAPTR;
  37. typedef char * GSTRPTR;
  38.  
  39. #include "gsystem/GError.h"
  40.  
  41. typedef struct 
  42. {
  43.     ULONG TagItem;
  44.     ULONG TagData;
  45. } GTagItem;
  46.  
  47.  
  48. class GObject
  49. {
  50. public:
  51.     GObject();
  52.     ~GObject();
  53.  
  54.     BOOL InitGObject(GSTRPTR type);
  55.     void PrintObjectType();
  56.  
  57.     GWORD GetErrors();
  58.     BOOL IsErrorFree();
  59.     BOOL AddError( GSTRPTR id, GSTRPTR errormsg );
  60.     GError *GetFirstError();
  61.     void PrintErrors();
  62.  
  63.     GSTRPTR GetType() { return ObjectType; };
  64.     GWORD GetSize() { return ObjectSize; };
  65. private:
  66.     GError *ErrorList;
  67.     GWORD ObjectSize;
  68.     char ObjectType[32];
  69. };
  70.  
  71. #endif /* OBJECT_H */
  72.  
  73.